package com.qing.emailservice.controller;

import com.qing.emailservice.service.SendEmailService;
import com.qing.servicebase.utils.ResponseResult;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName Yjx
 * @Description TODO
 * @date 2022/9/14 20:55
 * @Version 1.0
 */
@RestController
@RequestMapping("/userservice/email")
public class SendMailController {

    private final SendEmailService sendEmailService;

    public SendMailController(SendEmailService sendEmailService) {
        this.sendEmailService = sendEmailService;
    }

    @PostMapping(value = "/{email}")
    public ResponseResult sendEmail(@PathVariable("email") String email){
        return sendEmailService.sendEmailCaptcha(email);
    }

}
